﻿<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common/meta.jsp"%>
<%@ include file="/common/content.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>角色信息管理</title>
	</head>
	<body>
	
	<table class="listTable2">
			<tr>
				<td width="20px">
					<img src="${ctx}/image/jwc/tb.gif" width="16" height="16" />
				</td>
				<td width="90%">
					<span class="color:#000">当前位置</span>：[用户管理 - 角色管理]
				</td>
				<td>
					<a href="rolesAction!add_page.action">新增</a>
				</td>
			</tr>
		</table>
	
	<table class="listTable3" onmouseover="changeto()"
			onmouseout="changeback()">
			<tr>
				<td>
					角色名称
				</td>
				<td>
					权限
				</td>
				<td>
					状态
				</td>
				<td>
					基本操作
				</td>
			</tr>
         <c:forEach var="rolesList" items="${rolesList}">
        	 <tr>
				<td width="70px">
					${rolesList.name}
				</td>
				<td>
					<c:forEach var="ra" items="${rolesList.rolesAuthoritieses}" varStatus="status">
								${ra.authorities.displayName}&nbsp;&nbsp;						
					</c:forEach>
				</td>
				<td width="40px">
					<c:if test="${rolesList.state == 1}">已启用</c:if>
						<c:if test="${rolesList.state == 0}"><font color="red">已停用</font></c:if>
				</td>
				<td width="110px">
					<a href="rolesAction!view.action?id=${rolesList.id}">
		            	查看
		            </a>&nbsp; &nbsp;
		           <a href="rolesAction!edit.action?id=${rolesList.id}">
		            	编辑
		            </a>&nbsp; &nbsp;
		          <a href="rolesAction!delete.action?id=${rolesList.id}" onClick="{if(confirm('你真的要删除吗?')){return true;}return false;}">
		            	删除
		            </a>
				</td>
			</tr>
        </c:forEach>
        </table>
  
  <s:form action="rolesAction" method="get" name="form1" theme="simple">
		<table class="listTable2">
				<tr>
					<td width="50%">
						&nbsp;&nbsp;共有 <s:property value="pager.rowCount" /> 条记录，每页行数：
							<s:select name="pageSize" list="pager.pageSizeIndexs" 
								theme="simple"
								value="pager.pageSize"
								onchange="document.all.pageNo.value='1';document.all.form1.submit();" />当前第 
	            <s:select name="pageNo" list="pager.pageNoIndexs" theme="simple"
								value="pager.pageNo" onchange="document.all.form1.submit();" />
				 页
					</td>
					<td width="200px">
	                  <a
								href="javascript:document.all.pageNo.value='<s:property value="pager.firstPageNo" />';document.all.form1.submit();">
								<img src="${ctx}/image/jwc/first.gif" width="37" height="15" /></a>
	                 
	                  <a
								href="javascript:document.all.pageNo.value='<s:property value="pager.prePageNo" />';document.all.form1.submit();">
								<img src="${ctx}/image/jwc/back.gif" width="43" height="15" /></a>
	                
	                  <a
								href="javascript:document.all.pageNo.value='<s:property value="pager.nextPageNo"/>';document.all.form1.submit();">
								<img src="${ctx}/image/jwc/next.gif" width="43" height="15" /></a>
	                  
	                  <a
								href="javascript:document.all.pageNo.value='<s:property value="pager.lastPageNo" />';document.all.form1.submit();">
	                  <img src="${ctx}/image/jwc/last.gif" width="37" height="15" /></a>
	                  </td>
				</tr>
			</table>
	</s:form>
	</body>
</html>

